const dateServer = value => {
	if (value) {
		return value.length
	}
	return 0
}
export {
	dateServer
}

const drawFiles = (value1, value2) => {
	if (value1) {
		const num = value1 / value2 * 100
		return Math.floor(num)
	}
	return 0
}
export {
	drawFiles
}

const dateFiles = value => {
	if (value) {
		return value.slice(0, 10);
	}
	return ''
}
export {
	dateFiles
}


const scTimeFiles = value => {
	if (value) {
		var time1  = new Date(value.endDate.replace(/-/g, '/')).getTime()
		if(value.endDate.length<=0){
			time1  =new Date().getTime()
		}
		console.log(time1,'********')
		const time2 = new Date(value.beginDate.replace(/-/g, '/')).getTime() 
		const time =time1 -time2
		return (time/1000/60).toFixed(2) || 0;
	}
	return '0'
}
export {
	scTimeFiles
}


const timeFiles = value => {
	if (value) {
		return value.slice(5, 10);
	}
	return ''
}
export {
	timeFiles
}